Method of and apparatus for constructing an image of a notional scene by a process of ray tracing

ABSTRACT

A ray tracing method for construction an image of a notional scene from data concerning a plurality of objects in the scene and the illumination of the scene, involves allocating surfaces of objects in the scene into a plurality of subsets, projecting from a notional viewing position a plurality of straight line paths and storing data for all said paths, determining which, if any, of those straight line paths intersect any surface in a selected subset or a zone of illumination, and repeating that step for all the other subsets until all the paths have been tested for intersections against all surfaces in the scene. The method also determines, for each path, which intersection is nearest the viewing position and stores data on the co-ordinates for that intersection and on the surface of the object or zone of illumination at that intersection. The intensity in colour of light which will pass along the path through the notional viewing position from that intersection is then calculated and stored, and the stored intensity and/or colour is then used to produce a picture signal for a visual display. A plurality of paths are tested for intersections against a given subset of surfaces before the paths are considered in relation to other subsets, thereby reducing the number of times the subsets have to be called up from the database. The method can be conducted on apparatus which uses parallel ray processors.

FIELD OF THE INVENTION

This invention relates to a method of, and apparatus for, constructingan image of a notional scene. The invention is particularly concernedwith the construction of images by a process of ray tracing.

BACKGROUND TO THE INVENTION

Ray tracing is one of a number of processes by which a computer cangenerate an image of a notional scene containing, for example, one ormore objects illuminated by one or more localised light sources, or byambient light.

The ray tracing process determines, for each pixel to constitute theimage, whether any light rays would pass from the scene through theco-ordinates defining the position of the pixel relative to the sceneand to a notional viewing position. The contributions made by any suchrays to the notional intensity and colour of light incident on theviewing position are then calculated. This information determines therequired brightness and colour for the pixel. A basic ray-tracing methodis described in the article entitled "An Improved Illumination Model forShaded Display", in Communications of the ACM, 26 (6), 342-349 (Whitted1980).

Ray tracing enables a high resolution of image to be created, and candepict phenomena such as reflection, refraction and light scattering.

However, a large number of calculations have to be performed in order todetermine the path (and characteristics) of each light ray, as a resultof which a ray tracing method tends to be very slow.

SUMMARY OF THE INVENTION

According to one aspect of the invention there is provided a method ofconstructing an image of a notional scene, containing a plurality ofobjects, as viewed from one of a plurality of possible viewing positionsand illuminated in a known manner, from information on the co-ordinatesof the surfaces of the objects, on the optical characteristics of allthe points on those surfaces and on the particular illumination, whichinformation is stored in a computer memory, the method comprising:

A. Projecting from the viewing position a plurality of straight linepaths and storing data describing all said paths;

B. For one of the objects, determining which, if any, of the straightline paths intersect a surface of the object or a zone of illuminationand for each intersecting path determining the co-ordinates of theintersection nearest the viewing position and storing all saidintersections;

C. Repeating step B above for the other object or for each other objectin turn;

D. Determining, for each path, the nearest intersection to the viewingposition and storing same with data on the object surface at thatintersection;

E. Determining, for the stored surface data, the light which will passalong the path to the viewing position for each said nearestintersection and storing same as light intensity and position data; and

F. Reading out the stored light intensity and position data to produce apicture signal display on a visual display.

Since all of said plurality of the straight line paths are considered inrelation to the or each subset in turn, details of the surfaces in eachsubset only have to be retrieved from the memory once in order todetermine all the intersections of those straight line paths with thosesurfaces. Consequently the number of times that details of surfaces haveto be retrieved from the memory and hence the associated time delay, isminimised, as a result of which the ray tracing method can be performedmore rapidly than known methods in which details of each surface have tobe retrieved at least once per path.

Said plurality of straight line paths might be just some, but preferablyconstitute all, of the straight line paths needed to construct theimage.

Preferably, each subset contains the surfaces of a respective one of theobjects.

Preferably step E above involves projecting a set of one or moresecondary straight line paths from the intersection, if thecharacteristics of the object surface at the intersection are such thatlight, if incident on the interface along a direction defined by the/oreach secondary path, would be at least partially directed towards saidviewing position along the previous path; determining the intersectionsof the secondary paths with other objects (or light sources) nearest theintersection in accordance with steps B and C above; calculating fromdata on the intersections of the secondary paths, at least the intensityof any light incident on the intersections of the original straight linepaths in the directions defined by said secondary paths and, from theinformation on surface characteristics of the objects at theintersections on the original paths, calculating at least the intensityof the light incident on the viewing position along the original paths.

The method can thus take into account the effect on the appearance ofone object of light scattered or reflected from, or refracted throughanother object.

A more accurate determination of the intensity of light incident on theviewing position can be obtained by projecting one or more further setsof straight line paths in a similar fashion to the secondary straightline paths from the selected intersections of the previous set ofstraight line paths and determining the intensity of light incident onthe intersections along directions defined by said further set of paths.

Preferably, in addition to the intensity, the colour of any light to beemitted by the pixel is also determined. This can be done by regardingthe light as a combination of different colour components (for examplered, green and blue), the relative magnitudes of which define the colourof the light, and considering the combined effect on each component ofinteractions at the relevant interfaces.

Preferably, the process of determining which straight line pathsintersect a selected surface includes the step of determining for eachpath whether the path intersects a notional envelope which contains saidsurface, and discarding the path from further consideration in relationto the surface if it does not intersect the envelope.

Thus the notional object envelope can be used to reduce the number ofpaths which need to be considered in relation to the preciseco-ordinates of the object surfaces, since any path which does notintersect an envelope cannot intersect a surface contained therein.

The number of paths which need to be considered in relation to theenvelope can be reduced by determining which paths intersect a largerenvelope which contains a plurality of envelopes, and discarding pathswhich do not intersect said larger envelope from consideration inrelation to the other envelopes.

If the surface characteristic of an object at the intersection of a pathis such that incident light thereon would be diffused or scattered in amultitude of directions, a large number of further ray vectors,originating at that interface, would be required accurately to representthe possible directions of incident light rays which would be directedalong the path defined by the intersecting ray vector. In such a case,conveniently only one such further path, having a randomly selecteddirection, is generated.

Generating only one such further path at random reduces the accuracy ofthe calculation of the required intensity for a pixel to constitute partof the image, but, if a sufficient number of intersections occur in aregion of the object which has the aforesaid characteristic, the randomnature of the further paths generated at the intersections will tend tocompensate for such inaccuracies, particularly if more than one straightline path (on average) is projected from the viewing position for eachpixel, as happens in super sampling methods used to reduce the amount ofaliasing in the final image.

According to another aspect of the invention, there is providedapparatus for constructing an image of a notional scene containing aplurality of objects as viewed from one of a plurality of possibleviewing positions, the apparatus comprising:

a memory on which information on the co-ordinates of the surfaces of theobjects, the optical characteristics of all the points on those surfacesand on the illumination for the scene is stored;

ray tracing means for projecting from the viewing position a pluralityof straight line paths, and for determining which, if any, of the pathsintersect a surface of each object and for selecting the intersectionsof each path closest to the viewing position;

calculating means for determining, from the data on the object surfacesat said intersections and on the illumination of the scene, at least theintensity of the light which will pass along each said path to theviewing position; and

output means for generating a picture signal, representative of saidintensities, for display on a visual display, wherein all theintersections for the first object selected by the ray tracing means aredetermined before the intersections with the/or each other object, sothat the intersections are determined in respect of each object in turn.

Preferably, the ray tracing means comprises a plurality of dataprocessors which are connected to the memory, and which are so arrangedthat each processor generates a respective group of straight line pathsfor a respective part of the image, the intersections of each group witha selected object being determined simultaneously.

This feature is of particular advantage since details about the objectare retrieved from the memory by the processors simultaneously. Thisavoids the "bottle neck" which would occur if different processorsrequired information on different objects at any one time.

Preferably, each processor comprises a dedicated chip specificallyconfigured to perform the ray tracing operations. This enables theprocess to be more rapidly performed than would be the case if eachprocessor consisted of a general purpose chip in combination withspecific software.

Preferably, the calculating means is so arranged so as to combine theeffects of the interactions of a notional light ray at the relevantinterfaces by a process of logarithmic arithmetic.

This enables the Very Large Scale Integration (VLSI) calculations neededto make such a combination to be performed relatively quickly, whichmore than compensates for the additional time needed to convert theinitial values into their logarithmic equivalents.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be described, by way of example only, withreference to the accompanying drawings in which:

FIGS. 1 and 2 illustrate the basic principles of a ray tracing method;

FIG. 3 is a flow chart illustrating the steps involved in the prior artmethods of ray tracing;

FIG. 4 is a corresponding flow chart for a method in accordance with theinvention;

FIGS. 5 and 6 are diagrams illustrating further stages in a method inaccordance with the invention;

FIGS. 7 and 8 are flow charts showing the various steps involved inthose stages;

FIG. 9 is a block diagram of ray tracing apparatus, also in accordancewith the invention;

FIG. 10 is an isometric diagrammatic external view of a chip formingpart of the apparatus shown in FIG. 9;

FIG. 11 is a block diagram illustrating the architecture of the chipshown in FIG. 10;

FIGS. 12-15 are more detailed block diagrams of a number of thecomponents represented in FIG. 11;

FIG. 16 is a key for the function of the components represented in FIGS.12-15;

FIG. 17 shows a ray tree diagram relating to a method having a preferredfeature of the invention;

FIG. 18 shows additional apparatus for use with the apparatus shown inFIG. 9;

FIG. 19 illustrates, diagrammatically, an example of the data which canbe provided by the apparatus shown in FIG. 18;

FIGS. 20 and 21 illustrate how the apparatus shown in FIG. 9 uses thedata provided by the apparatus shown in FIG. 18; and

FIGS. 22 to 24 show an image constructed by three methods each inaccordance with the invention.

DETAILED DESCRIPTION

With reference to FIG. 1, a process of ray tracing can be used toconstruct an image of a notional scene which contains objects, 1 and 2,as viewed from a predetermined viewing position 4. The image is to beconstituted by a plurality of pixels the position of one of whichrelative to the scene is indicated by the reference number 6. The pixelsall lie in an image plane 8 interposed between the viewing position 4and the scene. The elements shown in FIG. 1 are initially in the form ofdata in a computer database, but the plane 8 and the viewing position 4respectively correspond to the screen on which the image is ultimatelydisplayed, and the position of a viewer relative to the scene.

A primary straight line path 10 is projected from the viewing position4, and passes through the pixel position 6. The path 10 can beconsidered to be of infinite length. All the intersections between thepath 10 and objects or other elements (such as light sources) in thenotional scene are compared, and all but the intersection nearest theposition 4 are disregarded. In the case of the path 10 the nearestintersection is with a surface of the spherical object 1 at a point 12.

The database contains information on a number of visually apparentcharacteristics of the object 1 which enable various possibleinteractions of light with the object 1 to be simulated. Thatinformation includes information on the directions of normals to thesurface of the object 1 at various points, including intersection 12,and on any light reflecting or scattering qualities of the object 1 atvarious points on its surface (including intersection 12).

In the present example, the object 1 is opaque, and as a result willonly reflect or scatter incident light. However images of transparent ortranslucent objects can also be generated, in which case the databasewill also store information on the light transmitting properties of suchobjects.

A secondary path 14 is generated since light incident on the interface12 in the direction along a path defined by the path 14 would be atleast partially reflected, refracted or scattered along the path 10, andintersections of the path 14 with any other objects/light sources can beanalysed in the same way as with the path 10, but in this case allintersections other than that closest to the intersection 12 aredisregarded.

If the process only considers primary and secondary paths the requiredintensity of the pixel 6 is then determined by calculating the effect ofthe intersections on the intensity of a notional incoming light raytravelling along the paths 10 and 14. Thus, if the selected intersectionof the path 14 is with a bright light source, a relatively highintensity value would initially be allocated. However, if the object 1is a very effective absorber of light, the intensity will beconsiderably reduced. In addition, if the path 14 does not intersect anylight source or any zone of ambient light, then a zero intensity valuewill be allocated. Thus in this case the final intensity value for thepixel is determined from the allocated intensity values of the selectedintersections of the paths.

In a similar fashion, the associated colour of the incoming ray (whichcan be represented by relative intensities of red blue and greencomponents) is also determined. The intensity and colour of the notionallight ray will represent the required brightness and colour to bedisplayed by the pixel 6. Once this calculation has been made for allthe pixels, the image can be displayed.

The image can be displayed by any suitable means, for example on aCathode Ray Tube (CRT) or by being printed on a photo sensitive film.

In the example shown in FIG. 1, the surface of the object 1 isreflective so that only one secondary path 14 is generated at theinterface 12. However, if the object 1 had a rough surface, incidentlight would tend to be scattered, as a result of which light incident onthe interface 12 on any one of a multitude of directions could bedirected along the path defined by the primary vector 10.

Such a situation is illustrated in FIG. 2, in which the references 16a-fdenote possible secondary paths which could be generated at theinterface between a spherical textured object 18 and a path 20 whichoriginates at a viewing position 21 and passes through a pixel 22.

In the arrangement shown in FIG. 2, the paths 16e-g also intersect lightscattering objects, and the process illustrated includes the step ofprojecting a further set of paths from the intersections of thosesecondary paths. Three groups of such paths are shown at 24, 26 and 28.In some variants of the method, further sets of paths can be generatedin a similar fashion, depending upon the required accuracy for thecalculation for each pixel.

In order to reduce the number of calculations required, a preferredfeature of the method of the invention is to select only one of thevectors which could be generated at the interface between a vector ofthe previous set and a light scattering surface. Thus, in this example,only one of the vectors 16 is selected at random, and if the selectedvector is 16e-g only one vector from the associated group of tertiaryvectors is selected at random.

With reference to the flow chart shown in FIG. 3, known ray tracingmethods determine the intersections of each path with any of the objectsin the scene independently of the other paths. Thus the ray tracingcircuitry used in such a method has to retrieve from a databaseinformation on all the objects at least once for each path (referred toas an "eye ray" in the chart). Consequently, the information on theobjects has to be retrieved a large number of times, as is indicated bythe nesting of the object programming loop 30 and pixel programming loop32.

Referring to FIG. 4, the method according to the invention initiallyprojects all the paths in a given set (primary, secondary, tertiaryetc), as is indicated by box 34. The circuitry retrieves details of agiven primitive as indicated in box 36, and determines which of thepaths intersects that primitive (box 38). All the paths of any given setare considered in relation to the object before details of any otherobject are called up, and consequently the details of the objects areretrieved fewer times than is the case with the known method. This isillustrated by the nesting of the loop 40, which represents therepetition of the tests for intersection for each path, within the loop42, which represents the retrieval of information about furtherprimitives.

Once the ray tracing process has been completed, an output signal,representative of the required colour and brightness for all the pixels,is generated (as represented by block 44).

FIGS. 5-7 illustrate the various stages involved in the intersectiontest represented by box 38. The data base which contains information onthe objects also contains information on notional spherical boundingenvelopes, the co-ordinates of which are such that each envelopecontains a respective object. FIG. 5 shows a number of objects to bedepicted in a scene, and the bounding envelopes, such as 46 and 48 foreach object.

The database also contains the co-ordinates of larger notional boundingenvelopes, each of which contains one or more object envelopes.

Examples of such larger envelopes are shown at 50, 52, 54, 56 and 58.

Before considering a path in relation to the actual co-ordinates of anobject, the process determines whether the path intersects successiveenvelopes which contain the object (but not the origin of the path). Thepath is disregarded if it does not intersect all such envelopes.

Thus, in the example shown in FIG. 6, the process of determining whethera primary path projected from a point directly above the plane of FIG. 6will intersect the object contained in the envelope 46 involves theinitial stage of determining whether the path intersects the envelope50. If no such intersection occurs the path is disregarded because itcannot intersect the envelope 46, but if there is such an intersectionthe question of whether the path also intersects the envelope 53 is thenconsidered. If such an intersection occurs, the process is repeated forthe envelope 52, and then the envelope 46 before the path is consideredin relation to the actual co-ordinates of the surfaces of the object.

The internal tree representation of FIG. 6 shows the variousalternatives which arise when analysing a given primary path in relationto any of the objects.

With reference to FIG. 9, the block 60 represents the ray tracingapparatus which generates the paths, determines the intersections andcalculates the required pixel output. The apparatus comprises a numberof ray tracing units, for example 63 and 64 connected in parallel to abroadcast data bus 66, which is in turn connected to a computer memory(not shown) which contains the required information on the objects inthe scene to be depicted and on the bounding envelopes.

Each of the ray tracing units is operable to generate an output signalrepresentative of the required output for a number of pixels allocatedto that unit, and that output signal is relayed along a pixel output bus68 connected in parallel to all of the ray tracing processors, and to amemory 70 and video output signal generator 72 of a frame store deviceindicated by the block 62. The device 62 includes a main (or host)processor 74 for controlling other units in the apparatus 60 and 62. Theunit 72 converts the signal from the output of the ray tracingprocessors into a video signal to be displayed on a CRT display 76.

With reference to FIGS. 10 and 11, each ray tracing processor unitcomprises a VLSI (Very Large Scale Integration) integrated silicon chip78 having the architecture illustrated in FIG. 11. Thus, the chip 78includes various registers counters and memory stacks 80 connected to aray stack memory 82, a ray data memory 84 and a ray intersection memory86. The memories 84 and 86 exchange information with an eye raycomputation unit 88, a redirection computation unit 90, an intersectioncomputation unit 92 and an output generation unit 96, all of which areconnected to the memories 84 and 86 by bus connectors 98 and 100. Theunits 88 and 92 are also connected at bus connector 66.

The eye ray computation unit 88 is shown in FIG. 12, and is used toinitialise the memory 86 with all the paths which are to be generated.The unit 88 also determines the cartesian co-ordinates for each path andto that end uses logarithmic multiplication, addition, division andsubtraction units. The functions of the logarithmic units are set out inthe key provided in FIG. 16. The unit 88 then feeds the co-ordinates ofeach path to the memory 84. Data regarding the co-ordinates andcharacteristics of surfaces in the scene and of bounding envelopes arealso supplied to the memory 84 via the bus 66 and the unit 88. Thememory 84 thus contains the data necessary for the subsequent processescarried out by the processor unit.

FIG. 13 shows the intersection computation unit 92 in more detail. Thisunit determines all the intersections of each path with the boundingvolumes (i.e. envelopes) and surfaces in the scene to be depicted, andalso uses logarithmic arithmetic to that end. Subsequently, theintersections with object surfaces other than an intersection with anobject surface closest to the origin of the vector are disregarded.

The unit 92 obtains the necessary co-ordinate data on the paths and theobject surface or bounding envelope surfaces from the memory 84, andstores the nearest intersection co-ordinate for an intersection with anobject surface in the memory 86, along with data on the opticalcharacteristics of an object surface at that intersection.

The paths, co-ordinates of which are stored in the memory 84, areidentified by means of addresses which are allocated by the unit 80.When a given path is found by the intersection computation unit tointersect a bounding envelope, the address for that path is stored inthe ray stack memory 82, which thus compiles a list of paths whichintersect that envelope. The ray stack memory stores those addresses atsuccessive memory locations, so that those addresses are subsequentlyread back in order. When the objects in that envelope are rendered,those addresses are read back from the ray stack memory 82 and used toindex the memories 84 and 86.

Thus only the paths which intersected the boundary envelope areconsidered in relation to the surfaces therein. The ray stack memory 82stores several address lists at once, the lists being storedcontiguously. This enables the hierarchical use of object envelopes aspreviously discussed.

The operation of the various units of the processor shown in FIG. 11 iscontrolled by a state machine 87, which generates a sequence of controlsignals for those units. That sequence is determined by thepredetermined sequence of operations to be carried out by the processorso that each unit and each of the buses is activated at the appropriatetimes.

Once all the primary paths have been tested for intersection with agiven surface, data on another surface is broadcast to the processor,thereby updating the memory 84, and the process described above isrepeated, until all the primary paths have been tested for intersectionswith all the object surfaces and sources of illumination in the scene.

An example redirection unit 90 is shown in more detail in FIG. 14. Oncethe database has been compared with all the primary paths, and data onthe nearest intersection for each path which intersect an object surfacestored in memory 86, this unit generates further secondary paths, bymeans of logarithmic arithmetic. For each such path, unit 90 acceptsdata on the co-ordinates and surface characteristics of the nearestintersection of that path from that memory 86 and generates secondarypaths accordingly. The co-ordinates of the secondary path are stored inmemory 84. The secondary paths are then tested for intersections withboundary envelopes and object surfaces in a similar fashion to theintersection tests performed on the primary path. In subsequent passesof the database tertiary rays may be formed from secondary paths in asimilar fashion and so forth. More complex redirection units arerequired to send paths to multiple light sources and in specular,diffuse and refracted directions.

In a modified form of the apparatus, for each intersection detected bythe unit 92 for a given path, unit 90 generates further redirectedpaths. If the intersection is found to be closer to the path origin thanany previous intersections of the path, then the redirected paths arewritten into the intersection memory 86 otherwise the paths arediscarded. This involves unnecessary computation as paths are redirectedand then sometimes discarded, however, no surface data need be stored inthe memory 86. After all the primary paths have been tested against thedatabase, the secondary paths are copied from the memory 86 into thememory 84. In subsequent passes of the database, tertiary rays may beformed from secondary rays and so forth.

FIG. 15 shows the output generation unit 96 in more detail. This unitconverts the intersection information in the ray memory into pixelintensities and colours, and generates an output signal representativethereof.

The output signal is fed along the bus connector 68 to the video output72 where it is incorporated into the video signal for the display 76.The intensity value for each pixel has three colour components, redgreen and blue, which when combined also define the colour of the pixel.

In use, each ray tracing processor unit calculates the required outputfor a group of pixels allocated to that unit, and the ray tracingprocessor units determine intersections with each object simultaneously.

The processor unit provides what is known as pipeline of operatingprocesses. This means that the unit performs different processes ondifferent straight line paths simultaneously.

Thus, for example, while the redirection computation unit 90 isgenerating secondary paths at the intersection of a primary path with asurface, the intersection computation unit 92 is testing the nextprimary path generated by the eye ray computation unit 88, while theunit 88 generates a third primary path.

Further details of the method of the apparatus are discussed below.

In order to test for intersection, the primary path origin and directionare calculated and this information is used to determine the rayintersection distance for the nearest intersection. The surfaceproperties of the object at the intersection are stored with thedistance in case that intersection turns out to be the nearest aftertesting all objects. Secondary paths must be handled in a second pass ofthe database, while further passes can be used to handle ray trees ofany depth. Having completed all passes desired, the colour of the eyerays (i.e. of light travelling along the primary path) can be output toa display device.

In the present method the database is broadcast just once (for each setof paths), and the paths for all the rays in the image are tracedtogether, rather than completing the path of one ray before starting thenext. Each level of reflection or refraction requires another pass ofthe database as further sets of vectors are generated. The broadcastdatabus is thus used very efficiently, with each element broadcast afixed (small) number of times (equal to the number of levels the raysare traced), independent of rays in the scene.

The video output port of the apparatus 60 carries image data at videorates and is connected to the 512-bit bus 68. The database and controlport could be connected to either the 512 bit-bus 68 or the 128 bit-bus66, but the data on this port is likely to be of a non-sequentialnature, and the bandwidth required is smaller (this will not be so inthe unlikely event that more than 8 MBytes of database are visible on a2 MPixel display).

A bounding volume (eg envelope 46) is transmitted on the broadcast bus66 before the objects contained within. In this manner, the object testscan be performed only on rays entering the bounding volume.

In order to render the whole image with just one access of eachprimitive of the database, the whole image is rendered simultaneously,and not pixel by pixel (which would require multiple accesses of eachelement in the database). The internal state of the ray tracing hardwaretherefore contains the state of the whole image as it is renderedelement by element. The effect is that of swapping the inner and outerloops present in most simple software ray tracers (FIGS. 3 and 4).

In order to render the whole image at once the renderer's memory 70holds the colour of every pixel (i.e. ray) at once, and also holds anystate which is referenced by that ray during the course of thecomputation.

Bounding volumes are allowed to contain both objects and furtherbounding volumes, creating a hierarchy. The number of intersection testsperformed then becomes logarithmic as a function of database size,rather than linear as in the non-hierarchical case. This allows largedatabases to be rendered--in fact for very large databases where mostobjects are obscured, the rendering time becomes virtually independentof database size.

The use of a hierarchical arrangement of bounding volumes (FIG. 6)involves structuring the database as a tree in which the visible objectscorrespond to leaf nodes and the parent nodes contain non-visiblebounding spheres, circumscribing all the corresponding leaf nodes. Theroot node for the whole tree thus specifies a sphere enscribing thewhole database--the "world sphere".

The rendering operation becomes traversal of the tree, and involvesbroadcasting first of all the world sphere (origin and radius), and thenthe daughter nodes recursively until all leaf nodes have been broadcast.The traversal is performed in a depth-first manner.

Optimisation is achieved by making use of the bounding sphereinformation in deciding which rays to consider further. Each ray vectorstored can be tested for intersection with the currently broadcastbounding sphere by a simple vector arithmetic test. If a ray vectorfails to intersect a bounding sphere, it cannot possibly intersect anyof the leaf nodes further down this branch of the tree. The paths thatfail the intersection test need not be considered again until the searchleaves this section of the tree. The number of intersection test is thusconsiderably reduced. The overall efficiency of the method depends onthe branching factor of the tree and its depth, as well as the projectedareas of the bounding spheres. The smaller the projected area of thebounding sphere at the ray origin, the more likely it is to be missedand eliminate unnecessary bounding sphere-ray and object ray tests. Ifall rays have missed a bounding sphere, then the broadcast of nodesfurther down the tree is not necessary (that part of the database has noeffect on the final image). The broadcast can jump to the next tree nodefor which some intersections are still possible.

The rendering process begins by initialising the ray memory on each raytracing processor. In the simple case of no antialising, each pixelproduces one eye ray. The ray memory holds the structure (describedearlier) with the origin being the camera position, the directionsderived from the pixel position and viewing direction, and the distancevalue set to "infinity" (the largest representable number).

The host processor 74 (i.e. the broadcasting agent) then broadcasts thebounding sphere corresponding to the root node of the database. All raysare then checked for intersection against this sphere. The rays thathave nearer intersections than found so far are placed in a list of(pointers to) rays to consider further. The host then (provided the listis non-empty) moves down the tree to the next level, and broadcasts thenext bounding sphere. All rays in the list that intersect aretransferred to a new list. The host carries on moving down the treeuntil a leaf node is met or the current list becomes empty. When thathappens, the current ray list is dropped (the previous list becomes thecurrent), and the host broadcasts the next untransmitted node up thetree and tests that against the (new) current ray list. This depth firstsearch is continued until the whole tree has been traversed, at whichpoint all the ray lists have been discarded. The first level rayintersections have now been found.

The host determines when all the current ray lists in the renderersbecome empty. This is achieved by a signal indicating if the currentlist is non-empty which is output by each renderer chip, and ORedexternally (using a wired-OR arrangement). In this way, the host candetermine if any processor needs the current bounding volume expanded ornot.

The process of shading and secondary path generation (known here as rayredirection) can now take place. All rays have their colour setaccording to the colour and other surface characteristics of theintersection stored with the associated paths. If there is only one pathproduced at the intersection, that new path's information can be storedin the same memory location as its parent path. If more than one path isproduced, the data must be stored in further memory locations, allcorresponding to the same screen pixel. At the end of the renderingprocess, the pixel intensity is computed as the sum of all paths derivedfrom that pixel. All these shading operations can take place withoutreference to the database, provided that the appropriate data has beenstored for each ray. The broadcasting agent need take no further actionuntil ray vector redirection has been completed.

The secondary paths can now be traced. The host processor follows thesame steps as before, starting the database search from the root nodeagain. It is likely at this stage that more of the database is accessedas the paths are now going in a wider range of directions (the primarypaths have a limited range of directions). Once the database traversalhas been completed, another shading process can take place. Shadowpaths, the paths which have failed to reach the light source are set toblack. Further reflected, refracted and shadow paths may be generated byray redirection as before.

Rendering can continue level by level until a defined limit, or untilthere are no rays left to be traced (weak rays could be discarded duringthe shading phase). When the final shading has been completed, theoutput stage can take place. All rays have their final intensities addedto the output image (initially set to black). Where a ray has been split(say into a reflected and a refracted component), the final pixelcontains the light from each path as required by the ray tracingalgorithm. The algorithm executed by the host processor is illustratedin FIG. 4.

Simply traversing each daughter branch of a node in arbitrary ordermeans that often, more distant bounding volumes will be searched beforethe nearer volumes. Ideally, for each ray, the nearer bounding volumeswill be searched before further bounding volumes. In this way, if anintersection has been found that is nearer than the nearest possibleintersection point in a further bounding volume, then that furtherbounding volume can be rejected as no nearer intersection could be foundin it. The bounding volumes behind the ray origin could also betrivially rejected. Unfortunately, the broadcast database algorithmprevents the optimal method. This is because there is only one treesearch order which is used for every vector considered, and differentvectors are likely to need different traversal orders for optimality.One way of improving the search order is as follows:

1) Move to the root node of the tree.

2) Expand the node to give the daughter nodes (probably boundingspheres).

For primary paths only:

3) Test each bounding volume for intersection with the viewing frustum,and

reject bounding volumes completely outside the viewing frustum (thisstep is optional).

4) Sort the nodes into order based on distance to camera (nearestfirst).

5) For each node in order, broadcast the node (bounding sphere orobject) and go to step 2 (recursively) if the node was a boundingsphere.

By using the algorithm, fewer unnecessary bounding volume and objecttests are done than in the simple tree-traversal case. The exactimprovement achieved is highly scene dependant. For example, where aview from inside a room is being rendered, the room node is expandedbefore any objects outside the room are considered. In this manner, mostof the database relating to the outside of the room is ignored.

For the simple case of ray casting (in which only primary paths aregenerated), only the eye rays are considered, so any part of thedatabase outside the viewing frustum is ignored.

The algorithm described above requires creation and maintenance ofseveral lists of rays. The method for doing this is described below.

Every path in the system is represented by its address in ray memory.When a path has entered a bounding sphere, the address is pushed onto astack 80. Once all the active paths have been considered, the new listof active paths is given by the list of paths just pushed onto thestack. A linking pointer is pushed onto the stack so that when the listis discarded, the stack pointer can be moved to the previous list.

This method of manipulating the active lists has been found to beeffective, and is readily implemented in hardware, requiring a singleRAM, a pointer register (for the next link pointer), and a loadableup-counter (for the stack pointer). It is interesting to note that thememory access pattern is very simple, requiring more frequent access tolocations nearer the top. A hardware cacheing scheme could be devised toprovide a large memory for both the pointer list described here, and theactual ray data. This would enable rendering of large pixel arrays byusing large relatively slow memories for the ray data and pointerswithout affecting overall cycle time. Such specific cacheing schemes arein use for stack based microprocessors (such as the Harris RTX 2000(Harris 1990).

The intensity and colour for each pixel in the output image isdetermined by computing a weighted sum of point samples in all thedimensions considered. The primary paths are determined from the viewgeometry and the output pixel grid in the usual way, but with offsetsadded to the pixel coordinates X and Y values for antialising, and tothe viewing position for depth of field. The paths are also timestampedwith an offset from the notional frame time if a moving sequence offrames is being calculated.

The primary paths are traced to the first intersection, at which point asingle diffuse path is generated emanating from the intersection pointin a random direction leaving the surface or a refracted path isgenerated or a specular ray is generated. The diffuse direction may beuniformly distributed over a hemisphere, and the ray intensity valuemultiplied by a factor determined from the intersection geometry(incoming and outgoing directions, surface type and normal), or aspecial distribution can be selected giving higher probability in thedirections with higher diffuse intensity. This secondary path is thentraced to the next intersection where the same process occurs.Ultimately almost every ray path (i.e. path defined by a primary pathand the subsequent set of path(s) associated with the primary path) willhit a light source of finite intensity, resulting in a contribution tothe corresponding pixel intensity, or will diverge to infinity or hit aninfinitesimal light source, making no intensity contribution. The raydefined by the paths is tested against the database corresponding to thetime offset stored with the associated vectors. The resulting ray treeis shown in FIG. 17.

The ray's final intensity is considered to be an estimate of the trueintensity of the pixel concerned, but will normally be highly inaccurateas only a single path to the light has been used rather than all thepossible paths, and the ray vector may be on the edge of a largeintensity change. By accumulating data from many such vectors, a goodestimate of the true intensity can be obtained, taking into account theeffects of sampling in all the dimensions concerned. Each sample takenrequires just one ray vector to be considered at each level ofreflection, resulting in a considerable simplification of memoryhandling. It is no longer necessary to store any of the ray tree inmemory, it is sufficient to compute a running product of thereflectivity at each level--in effect the branching ray tree has becomea simple (i.e. non-branching) list of intersections. Ray propagation canbe terminated when a path enters a light source (they must have finitearea), or can be arbitrarily cut off according to some criterion as innormal ray tracing. In this case an ambient value could be used, orblack could be used, indicating no light follows this particular path.

Logarithmic Arithmetic

The format used in the simulations and in the discussion here is a 20bit log representation of the base 2 logarithm, with binary point suchthat log values from -32.0000 to +31.99988 are represented. The sign ofthe number is maintained in the remaining bit (bit 0). All numbersbetween about -4×10⁹ and 4×10⁹ can be represented to just under fivesignificant figures, except for a small jump around zero. To reduce thenumber of special cases a simple format is used, and an exact zero andinfinities are unnecessary. There have been no artifacts observed by thelack of a zero, and where the maths requires it, the smallest positivenumber is used (called "smallest" here).

Various scalar operations have the following implementations in thisform of arithmetic:

    ______________________________________    Multiply       Add the logs (in two's complement)                   Saturate if overflow occurs, XOR                   sign bits.    Addition:    when signs match:                   result is: larger + f (larger-                   smaller)                   where f (x) = log (1 + 2.sup.-X)    when signs differ:                   as above                   but f (x) = log (1 - 2.sup.-X)    Subtract       Invert sign bit and use addition                   procedure    Square         Arithmetic Shift Left, saturate on                   overflow, sign bit = 0    Square root    Arithmetic Shift Right, give error                   if sign bit = 1    Divide         Subtract logs, saturate if overflow,                   XOR sign bits    Reciprocal     Two's complement    Compare        If signs are different, the positive                   one is larger                   If signs are same, compare the                   magnitude of the logs    ______________________________________     note: saturate means return (smallest) or (largest), depending on overflo     direction.

Another operation is introduced at this stage, the quadrature add(Qadd). This operation returns sqrt(x² +y²), and is useful for computingvector lengths, which evaluate to X Qadd Y Qadd Z. The advantage ofintroducing this operation is that the intermediate (x² +y²) is neverrepresented and so the operation cannot cause overflow unless the resultoverflows. Evaluating the expression directly would require an extra bitto be introduced, and would be represented by four function units. Thedirect implementation can use the same method as simple addition, butwithout the considerable overhead of handling negative numbers, as theinputs to the adder will always be positive.

It is worth noting that the comparison is also implemented as a specialfunction unit, as an efficient algorithm is simply to compare the logrepresentations, and invert the result if both numbers are negative.

All the common operations except addition and subtraction are seen to besimplified over a floating point representation, and the additionrequires log(1+2⁻²) to be determined. This function (known as Gauss'Logarithm) quickly falls to zero as x becomes large (x is alwayspositive), and could be implemented by tabulation (with or withoutinterpolation) or by a small multi-stage logic network perhapsdetermined by logic optimisation software. A compact implementation herewould allow a very large number of function units to be placed on even amodest size VLSI component.

The multipliers and dividers can be implemented with simple pipelinedadders or subtractors, checking for overflow.

The last block used in the block circuit (FIGS. 12-15) diagrams is theempty pipeline stage. This simply delays a signal by one clock cycle,aligning stages in time so that they compute on corresponding data. Theimplementation is simply as static or dynamic latches, according to thetechnology used.

The spatial coordinates in the database are represented by cartesiantriplets (x,y,z). These coordinate values must be held to at least theprecision corresponding to one pixel on the screen (so that surfaces maybe faceted), and preferably higher (for antialising and calculationintermediates). The range is sufficient to handle the range of distancesheld in the database or required for intermediates.

The representation requirements of direction vectors (such as surfacenormals) are slightly different from those of spatial coordinates.Because the length is always unity, the value of any coordinate cannever exceed one, and the range requirement is relaxed. Ideally, theerror in the representation should be roughly constant, independent ofdirection. There is thus no benefit in representing very small numbersaccurately. As before, the vector direction is held to an angularaccuracy that corresponds at least to the angular resolution of the eye.The fractional part of the log must therefore have 11 bits. The rangerequirement means that the log must hold numbers from -10 to 0, needingfour bits. The complete representation is therefore 16 bits (includingthe value sign), as before but missing the sign of the logarithm (thelog is always negative).

Representing the colour components is sufficient to provide enoughresolution to give negligible additional noise to the image. Here thelogarithmic representation is particularly effective, as the eye canresolve intensity changes down to a certain percentage change. Displaycircuitry such as the Cambridge Advanced Framestore display eight bitsof intensity precision. Input representation of object colours need notimprove on this, as visible effects would only be observed if avariation was enough to change the output by at least one quantum.Internal computations take place to at least this resolution to preventnoticeable degradation. The range of the representation is able to holdintensities at least from at least the dimmest to the brightness outputrequired (i.e. from 0 to 255 in the output buffer). The displays used bythe author give approximately double the intensity for a change of 64 inthe framestore (this may be seen by observing a striped pattern with thevalues 0 and 164, which is about as bright as a uniform intensity of100). The result of this is that the log (base two) of the actualintensity value runs from about (say) 0 to 4 with 256 steps, that is alogarithmic number system representation with two bits to the left ofthe binary point and six to the right. These eight bits can be writtento the display. If necessary, higher precision and range could beachieved simply by adding bits on the right or left respectively.

The method for interlinking the logarithmic maths units is simply viaclocked latches. On each clock pulse, new data may be entered into thelatches on the input side of a computation unit, while previous data areadvanced a stage. Where the computation requires data from a stagebefore the previous stage, extra latches can be inserted, holding thedata up for a known number of cycles. The computational latency is thusconstant and given by the number of stages.

The main internal blocks present in the ray tracer are shown in FIG. 11.The data structures given above are represented directly on wide databuses running through the system. The various computation units andmemories are connected to the buses, and bus timing and controlfunctions are provided by a simple state machine.

The eye ray computation unit 88 is responsible for initialising theray/intersection memory with all the primary paths that are to betraced. This requires initialisation with the viewing specification, thenumber of pixels, the number of distributed rays, and so on.

The ray intersection unit 92 is the system component responsible fordetermining the distance(s) (intersection lambda parameter) for the pathpassed on the internal bus with the externally applied data representingeither a bounding sphere or a primitive element type.

The redirection computation unit 90 generates the new paths for the nextlevel of ray tracing. It does this by scanning sequentially through eachpath in the ray memory 84, and moving the origin to any intersectionpoint found. The path's direction is calculated from the associatedintersection data.

The output generation unit 68 is the interface between the ray/rayintersection memory and the external system. The data rate necessarysuggested a single pixel wide path would be adequate to externalcircuitry, provided fairly high clock rates can be supported.

The ray memory is initialised with data generated by the unit 88. Theexternal interface specifies viewing parameters for the viewing eyepoint, look direction and screen x and y directions, all as cartesian3-vectors. The interface also supplies the maximum values of the xscreen coordinate and the y screen coordinate, together with the numberof primary paths to generate for each pixel. These are the values whichare loaded into the various counters allowing the requisite number ofpaths to be generated. In a system with multiple units, the hostprocessor can address (via a simple enable line) each interfaceindividually. In this way different ray tracing processors can handledifferent viewing conditions, perhaps different pixels, screen areas orviewpoints. The initial ray intensity (brightness) for each primary pathis also loaded.

Having loaded the specification for the view to be rendered, the unit 88can generate all the vectors necessary in rapid sequence and write theresulting ray specifications into the ray memory. The unit 88 consistsof a seven stage pipeline, so the memory writes are delayed by sevencycles to ensure the vectors written to the correct locations. If thevector memory is external to the chip, the rate will be limited by thecycle time of the memories and perhaps by the interface width (the chipmay multiplex external data lines, necessitating several transfers perray). The ray memory intersection structure is initialised by settinglambda (the intersection distance) to the maximum representable numberand the intersection surface colour to (0,0,0). A typical render for a576×768 pixel screen would generate about 2 000 000 primary pathsassuming about five samples per pixel. The initialisation time (0.02 s)for this would thus be under a frame time (assuming a 100 MHz internaloperation rate, high, but plausible for a sub-micron CMOS process). Theray tracer state machine then initialises the ray stack memory 82, andthe next stage of rendering can proceed.

Ray intersection unit--internal details

Once the initialisation has taken place, the host begins broadcastingthe database tree, element by element, from the root node in adepth-first manner. The ray intersection unit 92 reads the pathspecifications from the ray memory and tests the element broadcast bythe host for intersection, producing the new intersection lambda andsurface normal values. These values are stored in the ray memory if anobject hit is found.

The unit 92 reads the primitive type and interprets the broadcast dataas one of the structures described above. In the case of the boundingsphere, the maths is simply a vector cross product squared applied tothe path and the vector joining the path origin and the sphere origin(i.e. the vector difference). The value is compared to the sphere'sradius. If the bounding sphere is intersected, the (nearer) intersectiondistance is compared with that stored with the path. The intersectionunit sends a signal to the state machine if the intersection is nearer,indicating a possible object hit for objects contained within thebounding sphere. This signal causes the path (pointer) to be stackedready for the information on the contents of the bounding sphere to bebroadcast (i.e. the database tree further down this branch). Theprocessor can now output a signal (bounding volume expansion request)indicating the host should continue searching down the tree becausethere are some paths entering that section of the database.

In the case of an object plane being broadcast, the intersection test issimple, requiring a dot product between the surface normal and plane ofthe path displacement vector. The distance is compared with the distancestored with the other intersections of the path. If the new intersectionis nearer (but still positive), the ray intersection unit indicates thatan intersection has been found and the new intersection data are to bestored in place of the old data stored with the path.

Once the ray database has been compared against all paths, theintersections stored with each path now represent the actual physicalintersections that the path made. If further tracing is required for agiven path (for secondary, tertiary paths etc), each of the furtherpaths may now be directed by a process of reflection or refraction, orthe given path may be dropped because a ray defined thereby has aninsignificant intensity or because the path hits no object. If nofurther tracing is required, the ray memory may be scanned to generatethe output pixels. The purpose of the redirection unit 90 is to computethe new path origin, intensity and direction according to theinformation stored in the ray memory. The process consists of a sixstage pipeline.

The new path origin is simply the old path origin plus lambda unitsalong the direction of the latter. The new ray colour is the old colourmultiplied by the colour that the surface applies. The colour applied bythe surface could simply be the surface's diffuse colour, but a morerealistic system could be devised at the expense of extra silicon.

The new path direction depends on whether a reflected, refracted,diffuse or shadow ray is to be generated. If the simplificationsdescribed above are used, there are no shadow rays, and all illuminationis by area light sources. The concept of specular and diffusereflections are combined by adding a random displacement onto thespecular direction of a magnitude dependant on the surface specularcoefficient. These simplications result in requiring just two types ofredirection: reflection and refraction.

The process requires reading each ray memory location, and writing it anumber of clock cycles later. The complete scan will take twice as longas the initialisation process performed by the eye ray computation unit,or, in the 576×768, 5 time supersampled case about 0.04 seconds. Theredirection is required between primary and secondary ray rendering, andonce more for each further level. In the case of three levels of raypropagation (two reflections) the redirection adds about 0.08 seconds tothe rendering time.

The output unit 68 converts the intersection information in the raymemory into pixel intensities. The unit counts sequentially through thememory, multiplying the ray intensity by the intersection intensityproducing the intensity contribution for the ray path to the outputpixel. These contributions are summed in a accumulator (still usinglogarithmic arithmetic) until all the rays for that pixel have beenincluded, and then outputs the intensities in RGB format to an externalinterface. The conversion to RGB format is simply by taking the middleeight bits of the log representation. Numbers less than 1 cause zero tobe output--either the log of the number is less than zero giving the MSBset, or the value sign bit is set indicating negative intensity (whichshould not happen if all object have positive intensity). Valuesexceeding the output range (256 or more) cause 255 to be output. Thechoice of which bits are used determines the output gamma.

The time to output the completed image from the ray tracing unit isgiven by the slower of the ray memory time and the interface time. Forhigh supersampling factors, the ray memory must be cycled many times foreach output RGB value, and its cycle time will dominate.

The apparatus 60 begins by initialising all the eye rays in the scene.Each renderer chip holds a fraction of the total number of rays. Whenthe first bounding volume is processed, the renderer chips will finishsimultaneously--it takes two clock cycles to test each ray, and thenumber of rays considered by each chip is the same. The subsequentbounding volumes broadcast will take shorter and shorter times to test,as the number of rays considered by each processor shrinks. Theprocessors that finish earlier cannot continue processing until all therays have been tested by every chip. The architecture will thereforesuffer an inefficiency, if the number of rays handled by each chip atany level becomes too varied. The likelihood of this happening dependson the number of chips, the number of rays, and their distributionwithin the scene. As the number of processors becomes large, it would beadvantageous to perform a similar splitting in the y axis. If necessaryit would be possible to process different supersamples of the same pixelin different processors. The primary ray intersections in each processorwould be highly correlated, and the number of rays considered by eachwould be virtually identical. For secondary and subsequent ray passes,the distribution of ray directions becomes more random (especially withdiffuse illumination by distributed ray tracing). The problem of loadbalancing therefore becomes largely independent of the initial raydistribution.

A detailed analysis of the load distribution is complex, and should beconsidered in the context of real databases, however some idea can begained by a simple analysis. For the testing of bounding volumes high upthe database hierarchy, all processors have about the same load becausethey start with equal numbers of rays. As the number of rays consideredin each processor becomes small, the distribution becomes moreunbalanced, but the processing time becomes shorter. Far down the tree,where only a few rays are being processed, the time taken to broadcastthe next database element may become comparable to the time to processthe element, and the rendering becomes limited by the broadcast rate.Under these circumstances, any effect of processor imbalance isnegligible.

In cases where the load balancing becomes a problem, however, a smallbuffer on each chip could be devised which would enable a certain amountof storage of pre-broadcasting of the database. Processors that finishprocessing the current element could immediately start on the nextelement down the hierarchy. This would also even out the timing of theelement broadcasting by the host processor.

Some images may contain objects with intricate surface features whichmay be, for example, a surface pattern, such as a painting, orvariations in surface colour, specularity, specular power, refractiveindex, emissivity or orientation. These features would have to be testedagainst the straight line paths generated by the processors, but cannotbe stored on the memory 84 of a processor because that memory hasinsufficient capacity to store all the features for a whole surface.

FIG. 18 shows additional components for each processor, which can beused to store such details in the form of a texture map.

The components shown in FIG. 18 are incorporated into a modified versionof the intersection computation unit 92 shown in FIG. 11, and include atexture address computation unit 150 which is arranged to receive theco-ordinates of an intersection of a straight line path, such as thepath 152 of FIG. 19, with a surface 154. Those co-ordinates arerepresented by the parameters U and V which lie in the plane of thesurface 154, which has a region 156, various surface details for whichare stored as a texture map in a texture memory unit 101 connected tothe address computation unit 150.

The intersection computation unit converts the cartesian co-ordinates ofa given intersection into co-ordinates represented by the parameters Uand V, prior to supplying them to the unit 50, which then determineswhether the intersection lies within the region 156, and if it does,instructs the unit 101 to provide details of the surface 156 at thepoint of intersection, for example at the point 158. The data which theunit 101 provides for that point of intersection is then used by theintersection computation unit 92 to calculate the effects of thosesurface characteristics on any light which is directed from saidintersection along said path, and by the re-direction computation unit90 in the generation of further paths. Paths, such as path 160, which donot intersect the region 156 do not cause the unit 101 to generatesurface data.

Once all the intersections of paths with the region 156 have beendetermined, the units 150 and 101 can be overwritten with data for afurther texture map at a different region of the surface 154 or ofanother surface.

Where the amount of detail on a given region of a surface is too greatto be held within the memory 101, the surface can be split into a numberof regions, as shown in FIG. 20, in which the details of the region 156are contained on four texture maps, one in each of the regions 1 to 4.Those texture maps are referenced 160, 162, 164 and 168, and are eachloaded into the memory in turn.

In this case, the texture address computation unit conducts two levelsof tests on the paths which intersect the surface 154. The first levelcomprises determining which of the paths which intersect surface 154does so in a region which contains the texture map currently loaded intothe memory unit 101. Those paths which do intersect such a region arethen tested to determine which actually intersect the object at thetexture map. In this way, the unit 150 reduces the number of tests ofintersections needed in relation to the precise co-ordinates of thetexture map.

FIG. 21 illustrates a development of this approach, in which each of theregions of the surface 154 is divided into sub-regions, such as region2.3. In this case, the unit tests the paths on three levels, firstly itdetermines whether the paths are in a region which contains the texturemap in question, and then discards those paths which do not intersectthe surface 154 at a sub-region which contains the texture map, thusfurther reducing the number of paths which have to be considered inrelation to the precise co-ordinates of the texture map.

More specifically, the process involves the following steps:

A) Consider the texture data for the entire object to be the current setof optical data.

B) Determine whether the set of straight line paths requiring data fromthe current set of optical characteristics (i.e. texture data) is empty.If it is, then finish.

C) Determine whether the current set of optical characteristics is smallenough to be written into the texture memory unit. If it is, then go tostep G, and finish.

D) Choose subsets of the current set of optical characteristics.

E) For each subset (or group of subsets) of optical characteristics inturn, determine the subset (or group of subsets) of the current set ofstraight line paths which require said subset (or subsets) of opticalcharacteristics for illumination calculations, and start again from stepB with this subset (or sub sets) of optical characteristics as thecurrent set of optical characteristics and this subset of straight linepaths as the current set of straight line paths.

F) Finish.

G) Write the current set of optical characteristics into the texturememory unit.

H) Perform the illumination calculations on the current set of straightline paths.

I) Finish this set of optical characteristics, and continue with anyremaining subsets.

The above method may conveniently be implemented by means of a recursivesubroutine on the host processor, which initiates illuminationcalculations in the herein described image generating apparatus.

When choosing subsets of texture data, it is convenient to split saidtexture data into four or eight regions delimited by specific ranges ofthe two, or three parameter values. In this manner a hierarchy ofquadrants is chosen.

FIG. 22 shows an image which has been created by a ray tracing method inwhich only primary paths have been used. In this case, all the points onthe surfaces in the scene have allocated to them values representing thelight received from those points. Thus, those surfaces which are visiblehave, in effect, been treated as emitters of light. As can be seen, thisapproach enables the relative positions of objects to be displayed, butdoes not reveal any information on the effect of one object on the lightincident on another.

In FIG. 23, primary and secondary paths are used and the scene isilluminated by a notional single light source positioned out of theplane of FIG. 23. In this case, some of the surfaces in the scene arealso treated as emitters of light so that the areas of shadow are notshown as completely black. It will be seen that although shadow andsurface shine are now apparent, no reflection is visible in the mirrorsarranged behind the plant, the desk and the chair.

However, when the tertiary sets of paths are used, those reflectionsbecome visible, as shown in FIG. 24.

I claim:
 1. A method of constructing an image of a notional scene,containing a plurality of objects, as viewed from one of a plurality ofpossible viewing positions and illuminated in a known manner, frominformation on the co-ordinates of the set of surfaces defining theobjects, on the optical characteristics of all the points on thosesurfaces and on the particular illumination, which information is storedin a computer memory, the method comprising the steps of:A. Allocatingthe surfaces into a plurality of subsets each containing one or moresurfaces; B. Projecting from the viewing position a plurality ofstraight line paths and storing data describing all said paths; C. Forone of the subsets, determining which, if any, of the straight linepaths intersect at least one of the surfaces in that subset, or a zoneof illumination and determining the co-ordinates of said intersections;D. Repeating step C above for the other subset or for each other subsetin turn; E. Determining, for each path which intersects a surface orzone of illumination, the nearest intersection to the viewing positionand storing same with data on the object surface or zone of illuminationat that intersection; F. Determining, for each nearest intersection thelight which will pass along the path to the viewing position from saidintersection and storing same as light intensity and position data; andG. Reading out the stored light intensity and position data, to producea picture signal for a visual display.
 2. A method according to claim 1in which said plurality of straight line paths are of a sufficientnumber to enable the whole of the image to be constructed.
 3. A methodaccording to claim 1 in which step F involves, for each nearestintersection with a surface, generating a set of one or more secondarystraight line paths, from an origin defined by said nearestintersection, if the characteristics of the surface at the origin aresuch that light incident thereon along the or each secondary path willbe directed to said viewing position, determining the intersections ofthe or each secondary path with other surfaces or zones of illuminationclosest to said origin in accordance with steps C and D and calculatingat least the intensity of light incident on the origin along eachsecondary path, and calculating, from the characteristics of the surfaceat the origin, at least the intensity of that light which is incident onthe viewing position from the origin.
 4. A method according to claim 3in which step F involves the further steps of generating one or morefurther sets of straight line paths, in a similar fashion to thesecondary straight line paths, from the origins defined by selectedintersections of the previous set of straight line paths and determiningthe intensity of light incident on those origins along directionsdefined by said further set of paths.
 5. A method according to claim 1in which the determining of which straight line paths intersect aselected surface includes the step of determining whether each pathintersects a notional envelope which contains said surface, anddiscarding the path from further consideration in relation to thesurface if it does not intersect the envelope.
 6. A method according toclaim 5 in which the number of paths which need to be considered inrelation to the envelope is reduced by determining which paths intersecta larger envelope which contains a said envelope, and discarding pathswhich do not intersect said larger envelope from consideration inrelation to the envelope.
 7. A method according to claim 3 in which,where the surface characteristic of an object at said origin is suchthat incident light thereon would be diffused or scattered in amultitude of directions, so that light from each of a multitude offurther paths would be directed along said previous path, only one suchfurther path is generated at random.
 8. Apparatus for constructing animage of a notional scene containing a plurality of objects as viewedfrom one of a plurality of possible viewing positions, the apparatuscomprising:memory means on which information on the co-ordinates of thesurfaces of the objects, the optical characteristics of all the pointson those surfaces and on the illumination for the scene is stored, theco-ordinate data being arranged in subsets each containing data for oneor more object surfaces; ray tracing means for projecting from theviewing position a plurality of straight line paths for determiningwhich, if any, of the paths intersect a surface of each object or a zoneof illumination, and for selecting the intersections of each pathclosest to the viewing position; calculating means for determining, fromthe data on the object surfaces at said intersections and on theillumination of the scene, at least the intensity of the light whichwill pass along each said path to the viewing position; and output meansfor generating a picture signal, representative of said intensities, fordisplay on a visual display, wherein all the intersections for a firstsubset of one or more object surfaces selected by the ray tracing meansare determined before the intersections with the or each other subset,so that the intersections are determined in respect of each subset inturn.
 9. Apparatus according to claim 8 in which the ray tracing meanscomprises a plurality of data processors which are all connected to thememory, the arrangement being such that each processor generates arespective group of straight line paths for a respective part of theimage, the memory broadcasts each subset in turn to the processors, andthe intersections of each group with the or each surface of a selectedsubset are determined concurrently.
 10. Apparatus according to claim 9in which each processor comprises a dedicated chip specificallyconfigured to perform the ray tracing operations.
 11. Apparatusaccording to claim 10 in which each processor is so arranged as toperform different operations on different paths, in its respectivegroup, concurrently.
 12. Apparatus according to claim 8 in which thecalculating means is so arranged so as to combine the effects of theinteractions of a notional light ray at the relevant interfaces by aprocess of logarithmic arithmetic.
 13. Apparatus according to claim 8 inwhich the ray tracing means is operable to create a logarithmicrepresentation of the co-ordinates of each straight line path and totest each path for intersections and determine the co-ordinates of thenearest intersections by means of logarithmic calculations. 14.Apparatus according claim 9 in which each ray tracing processor isarranged to test its respective group of straight line paths forintersections with notional envelopes which contain the surface orsurfaces in respect of which said intersection tests are to beconducted, and the apparatus has storage means for storing dataidentifying the paths which have intersected the envelope so thatfurther intersection tests can subsequently be performed by theprocessor on those paths.
 15. Apparatus according to claim 14 in whichthe storage means is also arranged to store the co-ordinates of saidenvelopes, and comprises part of said memory means.
 16. Apparatusaccording to claim 9 in which said processors also incorporate thecalculating means so that each processor is also operable to calculatethe intensity of light travelling along each of its paths to the viewingposition.
 17. Apparatus according to claim 16 in which each processorincludes or is connected to a respective texture memory unit which isconnected to the memory means, and which is operable temporarily tostore a texture map of surface characteristics of the surface orsurfaces in the scene within a region defined by the boundary of the mapfor access by the calculating means to enable the latter to calculatethe light intensities and/or colours in respect of the straight linepaths intersecting the surfaces in said region.
 18. Apparatus accordingto claim 17 in which the memory means is operable to overwrite anytexture map currently stored in each texture store to enable thecalculating means to calculate the light intensities and/or colours inrespect of straight line paths which intersect surfaces in a differentregion of the scene.
 19. Apparatus according to claim 17 in which theprocessor is operable to determine which paths intersect a texture mapon a surface by dividing the surface into one or more regions anddetermining which paths intersect a region which contains theco-ordinates of at least part of the map and then determining which ofthese paths intersect the region defined by the co-ordinates of the map.20. A method according to claim 3 in which each set of secondary orfurther set of straight line paths is generated when an intersection ofthe previous straight line path is found, and before the intersection ofthe previous path nearest its origin or, as the case may be, the viewingposition is determined, and each set of secondary or further paths whichdoes not originate from said nearest intersection is subsequentlydiscarded.
 21. A method of constructing an image of a notional scene,containing a plurality of objects, as viewed from one of a plurality ofpossible viewing positions and illuminated in a known manner, frominformation on the co-ordinates of the set of surfaces defining theobjects, on the optical characteristics of all the points on thosesurfaces and on the particular illumination, which information is storedin a computer memory, the method comprising the steps ofA. allocatingthe surfaces into a plurality of subsets each containing a respectivegroup of surfaces; B. projecting from the viewing position a pluralityof straight line paths and storing data describing all said paths; C.for one of the subsets, determining which, if any, of the straight linepaths intersect at least one of the surfaces in that subset, or a zoneof illumination and determining the co-ordinates of said intersections;D. repeating step C above for the other subset or for each other subsetin turn; E. determining, for each path which intersects a surface orzone of illumination, the nearest intersection to the viewing positionand storing same with data on the object surface or zone of illuminationat that intersection; F. determining, for each nearest intersection thelight which will pass along the path to the viewing position from saidintersection and storing same as light intensity and position data; andG. reading out the stored light intensity and position data, to producea picture signal for a visual display, wherein all the paths aregenerated before intersections with the surfaces are determined, all thepaths are tested for intersections with all the surfaces in a givensubset before any one of the paths is tested for intersections with thesurfaces in the next subset and wherein information on the position andshape of each surface is stored in memory means from which informationon the surface is retrieved only once in order to determineintersections of that surface with all the paths.